import { Component, OnInit } from '@angular/core';
import {CONSTANT} from "../../service/constant.service";
import {ROUTE} from "../../service/route.service";
import {LocalStorage} from "../../app.local-storage";
import {CONTRACT} from "../../service/contract.service";
import {ActivatedRoute, Router} from "@angular/router";
import {CheckStandModel} from "../../model/checkstand.model";

@Component({
  selector: 'app-finished-payment-view',
  templateUrl: './finished-payment-view.component.html',
  styleUrls: ['./finished-payment-view.component.scss']
})
export class FinishedPaymentViewComponent implements OnInit {

  progressBarList:any=this.constant.progressBarList;
  checkstand:CheckStandModel;
  constructor(private constant:CONSTANT,
              private router:Router,
              private route:ROUTE,
              private contract:CONTRACT,
              private ls:LocalStorage,
              private routeInfo:ActivatedRoute) {
    this.checkstand = this.ls.getObject('checkstand') as CheckStandModel;
    if(this.checkstand.isNormal){
      this.progressBarList = [];
    }

  }
  ngOnInit() {
    console.log(window.location.href)
  }

  goToMyRentingView(){
    this.router.navigate([this.checkstand.route]);
  }
  goToHomeView(){
    this.route.goHomeView();
  }
}
